<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2021/12/10
  Time: 16:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
      <script src="resources/js/jquery-1.8.3.min.js" type="text/javascript"></script>
      <script src="resources/js/m_ajax.js" type="text/javascript"></script>
      <script type="text/javascript">
          $(function(){
              var message="${message}";
              if(message!=""){
                  alert(message);
                  return false;
              }
              $("#submit").click(function (){
                 var username=$("#username").val();
                 var password=$("#password").val();
                 if(username==""){
                     alert("账号不能为空!");
                     return false;
                 }
                  if(password==""){
                      alert("密码不能为空!");
                      return false;
                  }
              });
          });
      </script>
  </head>
  <body>
  <form action="login" method="post">
      <p>用户名:<input type="text" id="username" name="username"></p>
      <p>密码:<input type="password" id="password" name="password"></p>
      <p><input type="submit" id="submit" value="登录"></p>
  </form>
  </body>
</html>